package net.yla.smartbus.module.ba.right.admin.mapper;

import net.yla.smartbus.module.ba.right.admin.entity.AdminLoginLogsDO;
import net.yla.smartbus.module.ba.right.admin.query.LogCount;
import net.yla.smartbus.module.ba.right.admin.query.LogQuery;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Date: 2020-08-18 10:13
 * @Author: Being Nobody
 * @Version: 1.0
 */
@Repository
public interface AdminLoginLogsMapper {
    int deleteByPrimaryKey(Integer logId);

    int insert(AdminLoginLogsDO record);

    int insertSelective(AdminLoginLogsDO record);

    AdminLoginLogsDO selectByPrimaryKey(Integer logId);
    //根据adminId查询logId最大值
    AdminLoginLogsDO selectByLogId(Integer adminId);

    int updateByPrimaryKeySelective(AdminLoginLogsDO record);

    int updateByPrimaryKey(AdminLoginLogsDO record);

    int logOfCount(LogCount query, long ip);

    List<AdminLoginLogsDO> logOfQuery(LogQuery query, Long ip);

    //根据adminId查询
    List<AdminLoginLogsDO> findByAdminId(Integer id);
}
